cmake_minimum_required(VERSION 3.30)
project(work CXX C)
set(CMAKE_CXX_STANDARD 20)

#使用了Qt库和SQLite数据库，利用他们的接口，完成窗口界面和数据库的有关操作
find_package(Qt6 COMPONENTS Core Widgets)
find_package(SQLite3 REQUIRED)

set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTOMOC ON)


#包含.h的头文件的路径

include_directories(
        modules/Control
        ./modules/Database
        ./Main
)


#这里将.cpp文件搜集并添加到工程里面

file(GLOB SRC_IOandCommunication
        "modules/Control/*.cpp"
        "Main/*.cpp"
        "./modules/Database/*.cpp"
)

add_executable(work ${SRC_IOandCommunication})


#链接工程和Qt，SQLite数据库
target_link_libraries(work
    Qt::Core
    Qt::Widgets
    SQLite::SQLite3
)